$backgroundColor: #ffffff;
$foregroundColor: #2e405b;
$fontList: "Source Sans Pro", "Roboto", "Helvetica", "Helvetica Neue",
  "Source Han Sans SC", "Source Han Sans TC", "PingFang SC", "PingFang HK",
  "PingFang TC", sans-serif;
$titleFontList: "HiraMinProN-W6", "Source Han Serif CN", "Source Han Serif SC",
  "Source Han Serif TC", serif;
$verticalPrimaryPaddingTopPatch: 0;
$verticalSecondaryPaddingTopPatch: 1px;
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:100,300,400,600");
@import "animation";

html,
body,
span,
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: $fontList;
  color: $foregroundColor;
}

html {
  background: $backgroundColor;
}

.foreground {
  background: $foregroundColor !important;
}

.background {
  background: $backgroundColor !important;
}

.foreground-text * {
  color: $foregroundColor !important;
}

.background-text * {
  color: $backgroundColor !important;
}

h1 {
  font-size: 42px;
}

h2 {
  font-size: 36px;
}

h3 {
  font-size: 30px;
}

h4 {
  font-size: 24px;
}

h5 {
  font-size: 18px;
}

h6 {
  font-size: 14px;
}

body {
  font-size: 18px;
  line-height: 1.5em;

  @if lightness($backgroundColor) >50 {
    background: url("");
  } @else {
    background: url("");
  }

  background-repeat: repeat;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.04);
  min-height: 100vh;
}

.container {
  background-color: transparent;
  padding: 0;
  position: relative;
}

.full-width-container {
  width: 100vw;
}

.main-container {
  text-align: left;
  margin: 0;
  padding: 80px 40px;
  overflow: hidden;
  float: left;

  :nth-child(1) {
    margin-top: 0;
  }
}

.row {
  margin: 0;
}

.vertical-text {
  writing-mode: vertical-rl;

  * {
    line-height: 1;
    text-align: left;
  }
}

.side-container {
  height: 100vh;
  position: fixed;
  right: 0;
  font-style: normal;
  font-size: 1em;
  margin: 0;
  transform: rotate(0deg);
  text-align: left;
  float: right;
  padding: 80px 20px;
}

.ar-year {
  margin-top: 5px;
  margin-bottom: 5px;
}

.date {
  margin-bottom: 0px;
}

.ar-date {
  font-size: 16px;
  margin-bottom: 5px;
}

.archive :first-child {
  padding-left: 0;
}

.site-title {
  font-weight: bolder;
  font-style: normal;
  width: auto;
  height: auto;
  margin: 0 0 0 -2px;
  text-align: left;
  font-size: 0.5em;
  padding: 0 0 50px 0;
  border-left: solid $foregroundColor 2px;
  transition: padding 0.8s ease 0s, background 0.8s ease 0s;

  &:hover {
    padding: 15px 0 35px 0;
    color: $backgroundColor !important;
    background: $foregroundColor !important;
    border-left: solid $foregroundColor 2px;

    * {
      color: $backgroundColor !important;
    }
  }

  :first-child {
    margin-right: 10px;
  }

  * {
    text-align: left;
    font-weight: bolder;
    margin-top: 0;
    margin-left: 10px;
    margin-right: 0;
    font-family: $titleFontList;
  }
}

.site-title-large {
  font-size: 50px;
  padding-top: $verticalPrimaryPaddingTopPatch;
}

.site-title-small {
  font-size: 30px;
  padding-top: $verticalSecondaryPaddingTopPatch;
}

.site-title-links {
  font-weight: bold;
  font-style: normal;
  margin: 0;
  padding: 60px 0;
  text-align: left;
  position: fixed;
  bottom: 20px;
}

.site-title-links ul {
  list-style: none;
  padding: 0;
}

.site-title-links ul li {
  display: block;
  margin: 5px 0;
  font-size: 18px;
}

.site-title-links a {
  border-bottom: solid $foregroundColor 2px;
}

.no-margin-left {
  margin-left: 0;
}

.no-margin-right {
  margin-right: 0;
}

.no-margin-top {
  margin-top: 0;
}

.no-margin-bottom {
  margin-bottom: 0;
}

a {
  color: $foregroundColor;
  transition: color 0.3s ease 0s, background-color 0.3s ease 0s;
  -moz-transition: color 0.3s ease 0s, background-color 0.3s ease 0s;
  -o-transition: color 0.3s ease 0s, background-color 0.3s ease 0s;
  -webkit-transition: color 0.3s ease 0s, background-color 0.3s ease 0s;
  border-bottom: solid $foregroundColor 2px;
  padding: 0;
  cursor: pointer;
  cursor: hand;

  &:hover,
  &:focus {
    text-decoration: none;
  }

  &:hover {
    color: $backgroundColor !important;
    background-color: $foregroundColor;
    border-bottom: solid transparent 2px;
  }

  &:focus {
    color: darken($foregroundColor, 30%);
  }
}

.a-title {
  text-decoration: none;
  background-color: transparent;
  border-bottom: solid transparent 2px;

  &:hover,
  &:focus {
    background-color: transparent;
  }
}

.current {
  border-bottom: solid $foregroundColor 3px !important;
}

.a-mute {
  background-color: transparent;
  color: $foregroundColor !important;
  text-decoration: none;
  border-bottom: none;

  &:hover,
  &:focus {
    background-color: transparent;
    color: $foregroundColor !important;
    text-decoration: none;
    border-bottom: none;
  }
}

.soc {
  margin: 0 5px 0 0;
  font-size: 18px !important;

  a {
    border-bottom: solid transparent 2px;

    &:hover {
      @if lightness($foregroundColor) >50 {
        color: darken($foregroundColor, 10%) !important;
      } @else {
        color: lighten($foregroundColor, 10%) !important;
      }

      background-color: transparent !important;
      text-decoration: none;
      border-bottom: solid rgba(0, 0, 0, 0) 2px;
    }

    &:focus {
      @if lightness($foregroundColor) >50 {
        color: darken($foregroundColor, 10%) !important;
      } @else {
        color: lighten($foregroundColor, 10%) !important;
      }
    }
  }
}

.meta-item {
  margin: 0 10px 0 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

footer {
  margin-top: 10px;
  padding-top: 0;
  font-size: 12px;
  font-weight: bold;
}

footer * {
  margin: 0;
}

.post-container {
  margin: 0 0 20px 0;
  font-weight: normal;
}

.post-title {
  font-size: 24px;
  font-weight: bold;
  margin: 3px 0;
}

.post-meta {
  font-size: 16px;
  margin: 10px 0;
}

.post-abstract {
  font-size: 18px;
}

li {
  margin: 5px 0;
}

figure {
  overflow: scroll;
}

figure > table {
  width: 100%;
}

pre {
  * {
    font-family: Monaco, Menlo, "Source Code Pro", monospace;
    background: transparent !important;
  }
}

figure {
  .gutter pre {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    border-right: none;
    text-align: right;
    min-width: 3em;
  }
  .code {
    width: 99%;
    pre {
      border-bottom-left-radius: 0;
      border-top-left-radius: 0;
      border-left: solid rgba(0, 0, 0, 0.05) 1px;
      margin-right: 1px;
    }
  }
}

@media (max-width: 768px) {
  body {
    line-height: normal;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 34px;
  }

  h3 {
    font-size: 28px;
  }

  h4 {
    font-size: 22px;
  }

  h5 {
    font-size: 16px;
  }

  h6 {
    font-size: 14px;
  }

  .site-title-large {
    font-size: 38px;
  }

  .site-title-small {
    font-size: 22px;
  }

  .vertical-text {
    writing-mode: horizontal-tb;
  }

  .site-title {
    margin: 0;
    font-weight: bolder;
    font-style: normal;
    width: auto;
    height: auto;
    font-size: 0.5em;
    padding: 0;
    border-left: none;
    text-align: center;
    transition: none;
  }

  .site-title * {
    text-align: center;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .site-title:hover {
    color: $foregroundColor !important;
    background: transparent !important;
    padding: 0;
    border: none;
  }

  .site-title:hover * {
    color: $foregroundColor !important;
    background: transparent !important;
  }

  .main-container {
    text-align: left;
    height: auto;
    margin: 0;
    padding: 20px 30px;
    overflow: auto;
  }

  .side-container {
    padding: 40px 30px 0 30px;
    height: auto;
    position: relative;
    left: 0;
  }

  .site-title-links {
    position: unset;
    padding: 10px 0;
    margin: 10px 0;
    text-align: center;
  }

  .site-title-links ul li {
    display: inline;
    margin: 0 3px;
    font-size: 16px;
  }

  footer {
    padding-top: 30px;
    padding-bottom: 35px;
  }

  a {
    padding: 0;
  }

  .post-title {
    font-size: 20px;
    font-weight: bold;
    margin: 3px 0;
  }

  .post-meta {
    font-size: 14px;
    margin: 10px 0;
  }

  .post-abstract {
    font-size: 16px;
  }

  .soc {
    display: block !important;
  }

  .site-nav-footer {
    display: none !important;
  }

  .site-bottom-footer {
    display: block !important;
  }

  li.soc {
    margin-top: 5px !important;
  }
}

@media only screen and (max-height: 860px) {
  .site-title-large {
    font-size: 32px;
  }

  .site-title-small {
    font-size: 20px;
  }

  .site-title-links ul li {
    font-size: 14px;
    line-height: 1.3;
  }

  .site-nav-footer-br {
    display: none;
  }

  .side-container {
    padding-top: 40px;
    padding-bottom: 20px;
  }

  .main-container {
    padding-top: 40px;
    padding-bottom: 60px;
  }
}

@media only screen and (max-height: 600px) {
  body {
    line-height: normal;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 34px;
  }

  h3 {
    font-size: 28px;
  }

  h4 {
    font-size: 22px;
  }

  h5 {
    font-size: 16px;
  }

  h6 {
    font-size: 14px;
  }

  .site-title-large {
    font-size: 38px;
  }

  .site-title-small {
    font-size: 22px;
  }

  .vertical-text {
    writing-mode: horizontal-tb;
  }

  .site-title {
    margin: 0;
    font-weight: bolder;
    font-style: normal;
    width: auto;
    height: auto;
    font-size: 0.5em;
    padding: 0;
    border-left: none;
    text-align: center;
    transition: none;
  }

  .site-title * {
    text-align: center;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .site-title:hover {
    color: $foregroundColor !important;
    background: transparent !important;
    padding: 0;
    border: none;
  }

  .site-title:hover * {
    color: $foregroundColor !important;
    background: transparent !important;
  }

  .main-container {
    text-align: left;
    height: auto;
    margin: 0;
    padding: 20px 30px;
    overflow: auto;
  }

  .side-container {
    padding: 40px 30px 0 30px;
    height: auto;
    position: relative;
    left: 0;
  }

  .site-title-links {
    position: unset;
    padding: 10px 0;
    margin: 10px 0;
    text-align: center;
  }

  .site-title-links ul li {
    display: inline;
    margin: 0 3px;
    font-size: 16px;
  }

  footer {
    padding-top: 30px;
    padding-bottom: 35px;
  }

  a {
    padding: 0;
  }

  .post-title {
    font-size: 20px;
    font-weight: bold;
    margin: 3px 0;
  }

  .post-meta {
    font-size: 14px;
    margin: 10px 0;
  }

  .post-abstract {
    font-size: 16px;
  }

  .soc {
    display: block !important;
  }

  .site-nav-footer {
    display: none !important;
  }

  .site-bottom-footer {
    display: block !important;
  }
}
